package com.usian.behavior.controller;

import com.usian.behavior.service.impl.ApBehaviorEntryServiceImpl;
import com.usian.model.behavior.pojos.ApBehaviorEntry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/behavior")
public class ApBehaviorEntryController {

    @Autowired
    private ApBehaviorEntryServiceImpl apLikesBehaviorService;

    @PostMapping("/entry")
    public ApBehaviorEntry findByUserIdOrEquipmentId(@RequestParam Integer userId, @RequestParam Integer equipmentId) {
        return apLikesBehaviorService.findByUserIdOrEquipmentId(userId,equipmentId);
    }
}
